<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
<head>
    <script type="text/javascript" src="resources/js/raphael-min.js"></script>
    <script type="text/javascript" src="resources/js/dracula_graffle.js"></script>
    <script type="text/javascript" src="resources/js/dracula_graph.js"></script>
    <script type="text/javascript" src="resources/js/jquery-1.4.2.min.js"></script>
    <script type="text/javascript" src="resources/js/seedrandom.js"></script>
    <script type="text/javascript" src="resources/js/Curry-1.0.1.js"></script>
    <script type="text/javascript" src="resources/js/dracula_algorithms.js"></script>
    <script type="text/javascript">
<!--

var redraw;
var height = 300;
var width = 400;

/* only do all this when document has finished loading (needed for RaphaelJS) */
window.onload = function() {

    var g = new Graph();


    /* add a node with a customized label */
    g.addNode("id34", { label : "Duzey1" });
    g.addNode("id35", { label : "Duzey2" });
    g.addNode("id36", { label : "Il" });

    
    /* customize the colors of that edge */
    g.addEdge("id35", "id34", { stroke : "#bfa" , fill : "#56f", label : "hasRegion", directed : true});
    g.addEdge("id35", "id36", { stroke : "#bfa" , fill : "#56f", label : "hasCity", directed : true});
    /* add an unknown node implicitly by adding an edge */

    /* layout the graph using the Spring layout implementation */
    var layouter = new Graph.Layout.Spring(g);
    layouter.layout();
    
    /* draw the graph using the RaphaelJS draw implementation */
    var renderer = new Graph.Renderer.Raphael('canvas', g, width, height);
    renderer.draw();
    
    redraw = function() {
        layouter.layout();
        renderer.draw();
    };
};


-->
    </script>
</head>
<body>
<div id="canvas"></div>
<button id="redraw" onclick="redraw();">redraw</button>
</body>
</html>
